#!/bin/sh

#patch for Digma HDMP ver 1.9.9

#wait for unicgi starts
timeout=30
while [ $timeout -ne 0 ]; do
  if [ -h /tmp/www ]; then
	/usr/local/bin/unicgi stop
	break
  fi
  sleep 2
  let "timeout -= 1"
done

sleep 2
mkdir /tmp/www/
cp -Rfp /tmp_orig/www/* /tmp/www/

/usr/local/etc/mos/services start&
